A display screen of an electronic device (for example, a computer or a mobile phone) may be locked for data security when the electronic device is in a sleep mode. Usually, a user can enter a valid password to unlock the electronic device. The password can include letters, characters, alphanumeric characters, written characters, and symbols.